<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
<style>
	.layui-form-item .layui-input-inline{width:600px;}
</style>
<ul class="layui-tab-title site-demo-title">
	<li><a href="?m={$m}&c={$c}">单页面管理</a></li>
	<li class="layui-this"><a href="?m={$m}&c={$c}&a=add">添加单页面</a></li>
</ul>

<div class="layui-body layui-tab-content site-demo site-demo-body" style="bottom: 0;left: 0; top: 41px;">
	<div class="layui-tab-item layui-show">
		<div class="layui-main">
			<form class="layui-form ajaxform" action="?">
				<input type="hidden" name="m" value="{$m}" />
				<input type="hidden" name="c" value="{$c}" />
				<input type="hidden" name="a" value="{$a}" />
				<input type="hidden" name="id" value="{$id}" />
				<div class="layui-form-item">
					<label class="layui-form-label">标题：</label>
					<div class="layui-input-inline"><input type="text" name="data[title]" required="true" value="{$data['title']}" placeholder="请输入文章标题" autocomplete="off" class="layui-input"></div>
					<div class="layui-form-mid layui-word-aux"></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">关键词：</label>
					<div class="layui-input-inline"><input type="text" name="data[keyboard]" value="{$data['keyboard']}" placeholder="请输入关键词" autocomplete="off" class="layui-input"></div>
					<div class="layui-form-mid layui-word-aux"></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">图片：</label>
					<div class="layui-input-inline">
						<input type="text" class="layui-input" id="thumb" name="data[thumb]" value="{$data['thumb']}" />						
					</div>
					<div class="layui-word-aux"><input type="button" onclick="imageupload('thumb')" value="上传图片" class="layui-btn" /></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">摘要：</label>
					<div class="layui-input-inline">
						<textarea class="layui-textarea" name="data[summary]" style="width: 500px;">{$data['summary']}</textarea>
					</div>
					<div class="layui-form-mid layui-word-aux"></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">内容：</label>
					<div class="layui-input-inline">
						{createUEditor('data[content]',$data['content'])}
					</div>
					<div class="layui-form-mid layui-word-aux"></div>
				</div>


				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" type="submit">确定</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
	$("#backCourse").click(function(){
		location.href="{U('website/article')}";
	});
</script>
{template index/footer}